package com.ztesoft.web.common.db.arg;

import java.util.*;
import java.math.*;
import org.apache.commons.lang.*;

public class SysParamArg {
    private String pk_name = "PARAM_ID";

    private String orderByClause;

    private String groupByClause;

    private String columns;

    private String countsql1;

    private String countsql2;

    private boolean distinct;

    private int rowStart = 0;

    private int rowEnd = 10;

    private List<SysParamCriteria> oredCriteria;

    public SysParamArg() {
        oredCriteria = new ArrayList<SysParamCriteria>();
    }

    public void setPk_name(String pk_name) {
        this.pk_name = StringEscapeUtils.escapeSql(pk_name);
    }

    public String getPk_name() {
        return pk_name;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = StringEscapeUtils.escapeSql(orderByClause);
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setGroupByClause(String groupByClause) {
        this.groupByClause = StringEscapeUtils.escapeSql(groupByClause);
    }

    public String geGroupByClause() {
        return groupByClause;
    }

    public void setColumns(String columns) {
        this.columns = StringEscapeUtils.escapeSql(columns);
    }

    public String geColumns() {
        return columns;
    }

    public void setCountsql1(String countsql1) {
        this.countsql1 = StringEscapeUtils.escapeSql(countsql1);
    }

    public String geCountsql1() {
        return countsql1;
    }

    public void setCountsql2(String countsql2) {
        this.countsql2 = StringEscapeUtils.escapeSql(countsql2);
    }

    public String geCountsql2() {
        return countsql2;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public void setRowStart(int rowStart) {
        this.rowStart = rowStart;
    }

    public void setRowEnd(int rowEnd) {
        this.rowEnd = rowEnd;
    }

    public int getRowStart() {
        return rowStart;
    }

    public int getRowEnd() {
        return rowEnd;
    }

    public List<SysParamCriteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(SysParamCriteria criteria) {
        oredCriteria.add(criteria);
    }

    public SysParamCriteria or() {
    	SysParamCriteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public SysParamCriteria createCriteria() {
    	SysParamCriteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected SysParamCriteria createCriteriaInternal() {
    	SysParamCriteria criteria = new SysParamCriteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        groupByClause = null;
        columns = null;
        countsql1 = null;
        countsql2 = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<SysParamCriterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<SysParamCriterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<SysParamCriterion> getAllCriteria() {
            return criteria;
        }

        public List<SysParamCriterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new SysParamCriterion(condition));
        }

        protected void addCriterion(String condition, Object value,
                String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new SysParamCriterion(condition, value));
        }

        protected void addCriterion(String condition, Object value,
                String property, int likeType) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new SysParamCriterion(condition, value, likeType));
        }

        protected void addCriterion(String condition, Object value1,
                Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property
                        + " cannot be null");
            }
            criteria.add(new SysParamCriterion(condition, value1, value2));
        }

        public SysParamCriteria andCriterionEqualTo(String criterion) {
            if (StringUtils.isBlank(criterion)) {
                criterion = "1=1";
            }
            addCriterion(criterion);
            return (SysParamCriteria) this;
        }
        public SysParamCriteria andParamIdIsNull() {
            addCriterion("PARAM_ID is null");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdIsNotNull() {
            addCriterion("PARAM_ID is not null");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdEqualTo(Integer value) {
            addCriterion("PARAM_ID =", value, "PARAM_ID");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdNotEqualTo(Integer value) {
            addCriterion("PARAM_ID <>", value, "PARAM_ID");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdGreaterThan(Integer value) {
            addCriterion("PARAM_ID >", value, "PARAM_ID");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("PARAM_ID >=", value, "PARAM_ID");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdLessThan(Integer value) {
            addCriterion("PARAM_ID <", value, "PARAM_ID");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdLessThanOrEqualTo(Integer value) {
            addCriterion("PARAM_ID <=", value, "PARAM_ID");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdLike(Integer value) {
            addCriterion("PARAM_ID like ", value, "PARAM_ID", 1);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdNotLike(Integer value) {
            addCriterion("PARAM_ID  not like ", value, "PARAM_ID", 1);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdLeftLike(Integer value) {
            addCriterion("PARAM_ID like ", value, "PARAM_ID", 0);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdNotLeftLike(Integer value) {
            addCriterion("PARAM_ID  not like ", value, "PARAM_ID", 0);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdRightLike(Integer value) {
            addCriterion("PARAM_ID like ", value, "PARAM_ID", 2);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdNotRightLike(Integer value) {
            addCriterion("PARAM_ID  not like ", value, "PARAM_ID", 2);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdIn(List<Integer> values) {
            addCriterion("PARAM_ID  in ", values, "PARAM_ID");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdNotIn(List<Integer> values) {
            addCriterion("PARAM_ID not in ", values, "PARAM_ID");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdBetween(Integer value1, Integer value2) {
            addCriterion("PARAM_ID between ", value1, value2, "PARAM_ID");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamIdNotBetween(Integer value1, Integer value2) {
            addCriterion("PARAM_ID not between ", value1, value2, "PARAM_ID");
            return (SysParamCriteria) this;
        }
        public SysParamCriteria andParamNameIsNull() {
            addCriterion("PARAM_NAME is null");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameIsNotNull() {
            addCriterion("PARAM_NAME is not null");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameEqualTo(String value) {
            addCriterion("PARAM_NAME =", value, "PARAM_NAME");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameNotEqualTo(String value) {
            addCriterion("PARAM_NAME <>", value, "PARAM_NAME");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameGreaterThan(String value) {
            addCriterion("PARAM_NAME >", value, "PARAM_NAME");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameGreaterThanOrEqualTo(String value) {
            addCriterion("PARAM_NAME >=", value, "PARAM_NAME");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameLessThan(String value) {
            addCriterion("PARAM_NAME <", value, "PARAM_NAME");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameLessThanOrEqualTo(String value) {
            addCriterion("PARAM_NAME <=", value, "PARAM_NAME");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameLike(String value) {
            addCriterion("PARAM_NAME like ", value, "PARAM_NAME", 1);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameNotLike(String value) {
            addCriterion("PARAM_NAME  not like ", value, "PARAM_NAME", 1);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameLeftLike(String value) {
            addCriterion("PARAM_NAME like ", value, "PARAM_NAME", 0);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameNotLeftLike(String value) {
            addCriterion("PARAM_NAME  not like ", value, "PARAM_NAME", 0);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameRightLike(String value) {
            addCriterion("PARAM_NAME like ", value, "PARAM_NAME", 2);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameNotRightLike(String value) {
            addCriterion("PARAM_NAME  not like ", value, "PARAM_NAME", 2);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameIn(List<String> values) {
            addCriterion("PARAM_NAME  in ", values, "PARAM_NAME");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameNotIn(List<String> values) {
            addCriterion("PARAM_NAME not in ", values, "PARAM_NAME");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameBetween(String value1, String value2) {
            addCriterion("PARAM_NAME between ", value1, value2, "PARAM_NAME");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamNameNotBetween(String value1, String value2) {
            addCriterion("PARAM_NAME not between ", value1, value2, "PARAM_NAME");
            return (SysParamCriteria) this;
        }
        public SysParamCriteria andParamValueIsNull() {
            addCriterion("PARAM_VALUE is null");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueIsNotNull() {
            addCriterion("PARAM_VALUE is not null");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueEqualTo(String value) {
            addCriterion("PARAM_VALUE =", value, "PARAM_VALUE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueNotEqualTo(String value) {
            addCriterion("PARAM_VALUE <>", value, "PARAM_VALUE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueGreaterThan(String value) {
            addCriterion("PARAM_VALUE >", value, "PARAM_VALUE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueGreaterThanOrEqualTo(String value) {
            addCriterion("PARAM_VALUE >=", value, "PARAM_VALUE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueLessThan(String value) {
            addCriterion("PARAM_VALUE <", value, "PARAM_VALUE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueLessThanOrEqualTo(String value) {
            addCriterion("PARAM_VALUE <=", value, "PARAM_VALUE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueLike(String value) {
            addCriterion("PARAM_VALUE like ", value, "PARAM_VALUE", 1);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueNotLike(String value) {
            addCriterion("PARAM_VALUE  not like ", value, "PARAM_VALUE", 1);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueLeftLike(String value) {
            addCriterion("PARAM_VALUE like ", value, "PARAM_VALUE", 0);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueNotLeftLike(String value) {
            addCriterion("PARAM_VALUE  not like ", value, "PARAM_VALUE", 0);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueRightLike(String value) {
            addCriterion("PARAM_VALUE like ", value, "PARAM_VALUE", 2);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueNotRightLike(String value) {
            addCriterion("PARAM_VALUE  not like ", value, "PARAM_VALUE", 2);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueIn(List<String> values) {
            addCriterion("PARAM_VALUE  in ", values, "PARAM_VALUE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueNotIn(List<String> values) {
            addCriterion("PARAM_VALUE not in ", values, "PARAM_VALUE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueBetween(String value1, String value2) {
            addCriterion("PARAM_VALUE between ", value1, value2, "PARAM_VALUE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamValueNotBetween(String value1, String value2) {
            addCriterion("PARAM_VALUE not between ", value1, value2, "PARAM_VALUE");
            return (SysParamCriteria) this;
        }
        public SysParamCriteria andParamDescIsNull() {
            addCriterion("PARAM_DESC is null");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescIsNotNull() {
            addCriterion("PARAM_DESC is not null");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescEqualTo(String value) {
            addCriterion("PARAM_DESC =", value, "PARAM_DESC");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescNotEqualTo(String value) {
            addCriterion("PARAM_DESC <>", value, "PARAM_DESC");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescGreaterThan(String value) {
            addCriterion("PARAM_DESC >", value, "PARAM_DESC");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescGreaterThanOrEqualTo(String value) {
            addCriterion("PARAM_DESC >=", value, "PARAM_DESC");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescLessThan(String value) {
            addCriterion("PARAM_DESC <", value, "PARAM_DESC");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescLessThanOrEqualTo(String value) {
            addCriterion("PARAM_DESC <=", value, "PARAM_DESC");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescLike(String value) {
            addCriterion("PARAM_DESC like ", value, "PARAM_DESC", 1);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescNotLike(String value) {
            addCriterion("PARAM_DESC  not like ", value, "PARAM_DESC", 1);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescLeftLike(String value) {
            addCriterion("PARAM_DESC like ", value, "PARAM_DESC", 0);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescNotLeftLike(String value) {
            addCriterion("PARAM_DESC  not like ", value, "PARAM_DESC", 0);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescRightLike(String value) {
            addCriterion("PARAM_DESC like ", value, "PARAM_DESC", 2);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescNotRightLike(String value) {
            addCriterion("PARAM_DESC  not like ", value, "PARAM_DESC", 2);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescIn(List<String> values) {
            addCriterion("PARAM_DESC  in ", values, "PARAM_DESC");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescNotIn(List<String> values) {
            addCriterion("PARAM_DESC not in ", values, "PARAM_DESC");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescBetween(String value1, String value2) {
            addCriterion("PARAM_DESC between ", value1, value2, "PARAM_DESC");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andParamDescNotBetween(String value1, String value2) {
            addCriterion("PARAM_DESC not between ", value1, value2, "PARAM_DESC");
            return (SysParamCriteria) this;
        }
        public SysParamCriteria andStateIsNull() {
            addCriterion("STATE is null");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateIsNotNull() {
            addCriterion("STATE is not null");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateEqualTo(String value) {
            addCriterion("STATE =", value, "STATE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateNotEqualTo(String value) {
            addCriterion("STATE <>", value, "STATE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateGreaterThan(String value) {
            addCriterion("STATE >", value, "STATE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateGreaterThanOrEqualTo(String value) {
            addCriterion("STATE >=", value, "STATE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateLessThan(String value) {
            addCriterion("STATE <", value, "STATE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateLessThanOrEqualTo(String value) {
            addCriterion("STATE <=", value, "STATE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateLike(String value) {
            addCriterion("STATE like ", value, "STATE", 1);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateNotLike(String value) {
            addCriterion("STATE  not like ", value, "STATE", 1);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateLeftLike(String value) {
            addCriterion("STATE like ", value, "STATE", 0);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateNotLeftLike(String value) {
            addCriterion("STATE  not like ", value, "STATE", 0);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateRightLike(String value) {
            addCriterion("STATE like ", value, "STATE", 2);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateNotRightLike(String value) {
            addCriterion("STATE  not like ", value, "STATE", 2);
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateIn(List<String> values) {
            addCriterion("STATE  in ", values, "STATE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateNotIn(List<String> values) {
            addCriterion("STATE not in ", values, "STATE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateBetween(String value1, String value2) {
            addCriterion("STATE between ", value1, value2, "STATE");
            return (SysParamCriteria) this;
        }

        public SysParamCriteria andStateNotBetween(String value1, String value2) {
            addCriterion("STATE not between ", value1, value2, "STATE");
            return (SysParamCriteria) this;
        }

    }

    public static class SysParamCriteria extends GeneratedCriteria {

        protected SysParamCriteria() {
            super();
        }
    }

    public static class SysParamCriterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected SysParamCriterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }
        protected SysParamCriterion(String condition, Object value, int likeType) {
            this.condition = condition;
            if (likeType == 0) {
                this.value = "%" + value;
            }
            else if (likeType == 1) {
                this.value = "%" + value + "%";
            }
            else {
                this.value = value + "%";
            }
            this.typeHandler = null;
            this.singleValue = true;

        }

        protected SysParamCriterion(String condition, Object value,
                String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            }
            else {
                this.singleValue = true;
            }
        }

        protected SysParamCriterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected SysParamCriterion(String condition, Object value,
                Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected SysParamCriterion(String condition, Object value,
                Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}